import QtQuick 1.1
import com.nokia.meego 1.1

/*!
 * @brief Display the Header in the main page
 */
Rectangle {
	id: headerholder

	property alias text: header.text

	height: parent.width < parent.height ? UiConstants.HeaderDefaultHeightPortrait
										 : UiConstants.HeaderDefaultHeightLandscape
	width: parent.width
	//source: "image://theme/color7-meegotouch-view-header-fixed" + (theme.inverted ? "-inverted" : "")

	gradient: Gradient {
		GradientStop { position: 0.0; color: "#2244dd" }
		GradientStop { position: 1.0; color: Qt.lighter("#2244dd", 0.7) }
	}
	z: 1

	//! Header container
	Item {
		anchors {
			fill: parent
			topMargin: parent.width < parent.height
					   ? UiConstants.HeaderDefaultTopSpacingPortrait
					   : UiConstants.HeaderDefaultTopSpacingLandscape
			bottomMargin: parent.width < parent.height
						  ? UiConstants.HeaderDefaultBottomSpacingPortrait
						  : UiConstants.HeaderDefaultBottomSpacingLandscape
			rightMargin: UiConstants.DefaultMargin
			leftMargin: UiConstants.DefaultMargin
		}

		//! Page header text
		Label {
			id: header
			anchors { verticalCenter: parent.verticalCenter; left: parent.left }
			font: UiConstants.HeaderFont
			text: headerholder.text
			color: "white"
		}
	}
}

//! End of file
